<%--
  Created by IntelliJ IDEA.
  User: glxyC113
  Date: 2021/12/2
  Time: 9:24
  To change this template use File | Settings | File Templates.
--%>
<%@ page contentType="text/html;charset=UTF-8" language="java" %>
<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core"%>
<%@ taglib prefix="fmt" uri="http://java.sun.com/jsp/jstl/fmt" %>
<%
    String path = request.getContextPath();
    String basePath = request.getScheme() + "://"
            + request.getServerName() + ":" + request.getServerPort()
            + path + "/";
%>
<html>
<head>
    <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
    <title>无标题文档</title>
    <link href="<%=basePath%>css/style.css" rel="stylesheet" type="text/css" />
    <script type="text/javascript" src="<%=basePath%>js/jquery.min.js"></script>
    <script type="text/javascript">
        $(function(){
            $('tbody tr:odd').addClass("trLight");

            $(".select-all").click(function(){
                if($(this).attr("checked")){
                    $(".checkBox input[type=checkbox]").each(function(){
                        $(this).attr("checked", true);
                    });
                }else{
                    $(".checkBox input[type=checkbox]").each(function(){
                        $(this).attr("checked", false);
                    });
                }
            });
        });
        $(function() {
            $.ajax({//查询药品
                url: "<%=basePath%>drugsList",
                dataType: "json",
                //编码设置
                contentType: "application/json;charset=utf-8",
                success: function (data) {
                    for (var i = 0; i < data.length; i++) {
                        $("#drugsid").append("<option value='" + data[i].drugsid + "'>" + data[i].name + "</option>");
                    }
                },
                error: function (msg) {
                    alert("后台服务器出错，请联系系统管理员");
                }
            });
        });
    </script>
    <style type="text/css">
        body {
            background:#FFF
        }
    </style>
</head>

<body>
<form method="post" action="<%=basePath%>ZdkyAddController" method="post" name="ThisForm">
    <input type="hidden" name="roid" id="roid" value="${roid}"/>
    <input type="hidden" id="yzid" name="yzid" value=""/>
    <div id="contentWrap">
        <!--表格控件 -->
        <div id="widget table-widget">
            <div class="pageTitle">医生诊断药品添加</div>
            <div class="pageInfo">
                <table>
                    <tr>
                        <td width="20%" align="right">药品</td>
                        <td width="20%" ><select id="drugsid" name="drugsid">
                            <option value="">--请选择--</option>
                        </select></td>
                        <td width="10%" align="right">数量</td>
                        <td width="50%"><input type="text" id="num" name="num" /></td>
                    </tr>
                    <tr>
                        <td width="20%" align="right">描述</td>
                        <td width="80%" colspan="3"><textarea rows="5"  id="descs"
                                                              name="descs" style="width:99%"></textarea></td>
                    </tr>
                    <tr>
                        <td colspan="4" align="center"><input type="submit" value="确定" /></td>
                    </tr>
                </table>
            </div>
        </div><!-- #widget -->
    </div>
</form>
</body>
</html>
